.PHONY: build run test clean docker-build docker-up docker-down

# 构建
build:
	@echo "构建 API Gateway..."
	@go build -o bin/gateway ./cmd/gateway

# 运行
run:
	@go run ./cmd/gateway

# 测试
test:
	@go test -v ./...

# 清理
clean:
	@rm -rf bin/
	@rm -rf logs/

# Docker 构建
docker-build:
	@docker-compose build

# Docker 启动
docker-up:
	@docker-compose up -d

# Docker 停止
docker-down:
	@docker-compose down

# 格式化代码
fmt:
	@go fmt ./...

# 检查代码
vet:
	@go vet ./...

# 安装依赖
deps:
	@go mod download
	@go mod tidy


